package com.njlime.sys.entities;

import com.njlime.core.base.entities.BaseEntity;

import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * 定时任务表实体类
 *
 * @since 
 */
@Entity
@Table(name = "t_regular_task")
public class RegularTask extends BaseEntity{
    private String name; // 任务名称
    private String clazz; // 任务路径
    private String cron; // 任务执行事件
    private String param; // 任务参数
    private Integer status; // 执行状态：0未执行1已执行2执行失败3已取消
    private Date create_time; // 创建时间
    private Date exec_time; // 执行时间

    public static final class RegularTaskStatus{
        public static final Integer UN_EXECUTE = 0; //未执行
        public static final Integer EXECUTED = 1; //已执行
        public static final Integer FAILED = 2; //执行失败
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getClazz() {
        return clazz;
    }

    public void setClazz(String clazz) {
        this.clazz = clazz;
    }

    public String getCron() {
        return cron;
    }

    public void setCron(String cron) {
        this.cron = cron;
    }

    public String getParam() {
        return param;
    }

    public void setParam(String param) {
        this.param = param;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Date getCreate_time() {
        return create_time;
    }

    public void setCreate_time(Date create_time) {
        this.create_time = create_time;
    }

    public Date getExec_time() {
        return exec_time;
    }

    public void setExec_time(Date exec_time) {
        this.exec_time = exec_time;
    }
}